Results of Expressions
The result of any expression is its value.You can use the Script Editor to display the result of an expression by typing an expression on a line by itself and running the script. AppleScript returns the value of the expression. Here's an example:
-
Open the Script Editor if it is not already open.
-
Type the following expression in the editor subwindow:
3 + 4
-
Click the Run button in the Script Editor window.
This causes AppleScript to evaluate the expression and show the result,
7
, in the result window.
-
Choose Show Result from the Controls menu.
If the result window is behind another Script Editor window, this will bring it to the front.
© 1999 Apple Computer, Inc. – (Last Updated 21 May 99)